NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Technical Q&A QD3D63
Setting Data For Q3ViewerUseData


Q: I've defined a pane where I want to display 3D objects with the 3DViewer. There is no problem if I load the 3D data from a file and use 'Q3ViewerUseFile'. But I couldn't figure out how I have to set the data for the 'Q3ViewerUseData' routine. From where do I get the "size"?

A: According to chapter 2 "3D Viewer" pg. 2-10 of 3D Graphics Programming with QuickDraw 3D: "You use the Q3ViewerUseData function to specify a 3D model whose data is already in memory (either on the Clipboard or elsewhere in RAM). Q3ViewerUseData takes a reference to an existing viewer object, a pointer to the metafile data in RAM, and the number of bytes occupied by that data."

Basically, the data you pass to Q3ViewerUseData must be in 3dmf object format. For example, if the user had copied a 3dmf file from the scrap.

In this case, you would get the size of the data from the Scrap Manager. Take a look at the Tumbler & Podium sample in the QD3D SDK for an example.

[Jul 11 1997]


Developer Documentation | Technical Notes | Development Kits | Sample Code